

import javax.swing.*;

public class Level {
    void end(){
        if(GameUtil.INIT) return;
        GameUtil.INIT=true;
        for(int i=0;i<GameUtil.MAX_W;i++)
            for(int j=0;j<GameUtil.MAX_H;j++)
                if(GameUtil.mp[i][j]==-1) GameUtil.MAP_TOP[i][j] = 0;
        JOptionPane.showMessageDialog( null,"请点击上方头像", "失败",JOptionPane.PLAIN_MESSAGE);
    }
    boolean Victory(){
        int sum=0;
        for(int i=0;i<GameUtil.MAX_W;i++)
            for(int j=0;j<GameUtil.MAX_H;j++)
                if(GameUtil.MAP_TOP[i][j]==0) sum++;
        return sum>=GameUtil.MAX_W*GameUtil.MAX_H-GameUtil.bomb_MAX;
    }
    void victory(){
        if(GameUtil.INIT) return;
        GameUtil.INIT=true;
        GameUtil.numbei++;
        JOptionPane.showMessageDialog( null,"请点击上方头像", "胜利",JOptionPane.PLAIN_MESSAGE);
        GameUtil.state=1;
    }
}